<template>
  <div class="button-demo">
    <!-- 基础按钮 -->
    <div class="demo-section">
      <h3>基础按钮</h3>
      <van-button type="primary">主要按钮</van-button>
      <van-button type="success">成功按钮</van-button>
      <van-button type="default">默认按钮</van-button>
      <van-button type="warning">警告按钮</van-button>
      <van-button type="danger">危险按钮</van-button>
    </div>

    <!-- 朴素按钮 -->
    <div class="demo-section">
      <h3>朴素按钮</h3>
      <van-button plain type="primary">朴素按钮</van-button>
      <van-button plain type="success">朴素按钮</van-button>
    </div>

    <!-- 禁用状态 -->
    <div class="demo-section">
      <h3>禁用状态</h3>
      <van-button disabled type="primary">禁用状态</van-button>
      <van-button disabled type="success">禁用状态</van-button>
    </div>

    <!-- 加载状态 -->
    <div class="demo-section">
      <h3>加载状态</h3>
      <van-button loading type="primary" loading-type="spinner" />
      <van-button loading type="success" loading-text="加载中..." />
    </div>

    <!-- 按钮尺寸 -->
    <div class="demo-section">
      <h3>按钮尺寸</h3>
      <van-button type="primary" size="large">大号按钮</van-button>
      <van-button type="primary" size="normal">普通按钮</van-button>
      <van-button type="primary" size="small">小型按钮</van-button>
      <van-button type="primary" size="mini">迷你按钮</van-button>
    </div>

    <!-- 自定义颜色 -->
    <div class="demo-section">
      <h3>自定义颜色</h3>
      <van-button color="#7232dd">单色按钮</van-button>
      <van-button color="#7232dd" plain>单色按钮</van-button>
      <van-button color="linear-gradient(to right, #ff6034, #ee0a24)">
        渐变色按钮
      </van-button>
    </div>

    <!-- 圆形按钮 -->
    <div class="demo-section">
      <h3>圆形按钮</h3>
      <van-button round type="primary">圆形按钮</van-button>
      <van-button round type="success">圆形按钮</van-button>
    </div>
  </div>
</template>

<script setup>
// 如果需要处理按钮事件，可以在这里添加处理函数
</script>

<style scoped>
.button-demo {
  padding: 20px;
}

.demo-section {
  margin-bottom: 20px;
}

.demo-section h3 {
  margin-bottom: 10px;
  color: #323233;
  font-weight: normal;
  font-size: 14px;
}

.van-button {
  margin-right: 10px;
  margin-bottom: 10px;
}

/* 大按钮独占一行 */
.van-button--large {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}
</style>
